<?php
class ShareController extends BaseController {

	function init(){
		parent::init();

	}

	function indexAction(){
		$data = $user_info = array();
		$data['from'] = isset($_REQUEST['from']) ? ($_REQUEST['from']) : ' ';
		$data['friend_id'] = isset($_REQUEST['friend_id']) ? intval($_REQUEST['friend_id']) : ''; //邀请好友uid
		$data['date_id'] = isset($_REQUEST['date_id']) ? intval($_REQUEST['date_id']) : ''; //聚会ID

		if(!empty($data['friend_id'] )){
			$user_model = new UserModel();
			$user_info = $user_model->getUserInfoByUid($data['friend_id'] );
		}

		if(!empty($user_info)){
			$data['nickname'] = $user_info['nickname'];
		}
		$data['avatar'] = !empty($user_info['avatar']) ? QINIU_DOMAIN . $user_info['avatar'] : QINIU_DOMAIN . '15955755425768.png';


		$data['code'] = "from=".$data['from']."&friend_id=".$data['friend_id']."&date_id=".$data['date_id'];
		$this->_view->data = $data;
	}
}
?>
